---
title: Prem AI
---

The `PremEmbeddings` class uses the Prem AI API to generate embeddings for a given text.

## Setup

In order to use the Prem API you'll need an API key. You can sign up for a Prem account and create an API key [here](https://studio.premai.io/sign-up).

You'll first need to install the [`@langchain/community`](https://www.npmjs.com/package/@langchain/community) package:

import IntegrationInstallTooltip from '/snippets/javascript-integrations/integration-install-tooltip.mdx';

<IntegrationInstallTooltip/>

```bash npm
npm install @langchain/community @langchain/core
```

## Usage

import Premai from "/snippets/javascript-integrations/examples/embeddings/premai.mdx";

<Premai />

## Related

- Embedding model [conceptual guide](/oss/concepts/embedding_models)
- Embedding model [how-to guides](/oss/how-to/#embedding-models)
